package com.chen.utils;

import com.chen.mapper.JournalMapper;
import com.chen.model.JournalInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;

/**
 * 日志工具类
 * Created by 陈梓平 on 2017/9/11.
 */
@Component
@Transactional
public class JournalUtils {

    @Autowired
    private JournalMapper jouUtilsJournalMapper;
    @Autowired
    private JournalInfo journalInfo;

    /**
     * 添加日志
     * @param modeularType
     * @param operationType
     */
    public void addJournalInfo(int modeularType,int operationType,int uid) {
        journalInfo.setModularType(modeularType);
        journalInfo.setOperationType(operationType);
        journalInfo.setUid(uid);
        jouUtilsJournalMapper.addJournalInfo(journalInfo);
    }
}
